#include"core_conf.h"
#include"stdio.h"
#include"stdlib.h"


//the pcap_mode 1 represent use of interface and the 0 represent use  of file
//the dafault interface is eth0


void core_conf_from_file(struct core_conf *Core_conf,char * file_name)
{
	FILE *fp;
	if((fp=fopen(file_name,"r"))==NULL)
	{
		log_info("can not open this file");
		exit(0);
	}

	Core_conf->core_conf_file=file_name;
	Core_conf->pcap_mode=1;


	Core_conf->pcap_file=NULL;
        Core_conf->pcap_interface="eth0";
        Core_conf->pcap_handle=NULL;
        Core_conf->pcap_datalink_type=0;


       	Core_conf->max_id=5000000;
        Core_conf->mode=1;

        Core_conf->usleep_time=10;

        Core_conf->use_mm=1;
        Core_conf->mm_limit=2147483647;

        Core_conf->use_mail=1;

        Core_conf->to="2412546652@qq.com";	
}
